package com.tsj;

import com.tsj.common.URL;
import com.tsj.protocol.HttpServer;
import com.tsj.register.LocalRegister;
import com.tsj.register.MapRemoteRegister;


/**
 * @Author tsj
 * @Date 2023/11/15/14:20
 */
public class Provider {

    public static void main(String[] args) {
        LocalRegister.register(HelloService.class.getName(),"1.0",HelloServiceImpl.class);

        // 注册中心注册 服务注册
        URL url = new URL("localhost",8000);
        MapRemoteRegister.register(HelloService.class.getName(),url);


        // tomcat  netty
        HttpServer httpServer = new HttpServer();
        httpServer.start(url.getHostName(),url.getPort());
    }
}
